﻿using System;
using System.ComponentModel;
using System.Runtime.InteropServices;
using Teigha.Core;

namespace Teigha.TD
{
	public class OdDbSection : OdDbEntity
	{
		[EditorBrowsable(EditorBrowsableState.Never)]
		public OdDbSection(IntPtr cPtr, bool cMemoryOwn) : base(TD_DbPINVOKE.OdDbSection_SWIGUpcast(cPtr), cMemoryOwn)
		{
			this.swigCPtr = new HandleRef(this, cPtr);
		}

		[EditorBrowsable(EditorBrowsableState.Never)]
		public static HandleRef getCPtr(OdDbSection obj)
		{
			if (obj != null)
			{
				return obj.swigCPtr;
			}
			return new HandleRef(null, IntPtr.Zero);
		}

		~OdDbSection()
		{
			this.Dispose();
		}

		public override void Dispose()
		{
			if (this.swigCPtr.Handle != IntPtr.Zero)
			{
				if (this.swigCMemOwn)
				{
					lock (this.locker)
					{
						if (this.swigCPtr.Handle != IntPtr.Zero && this.swigCMemOwn)
						{
							this.swigCMemOwn = false;
							TD_DbPINVOKE.delete_OdDbSection(this.swigCPtr);
						}
					}
					this.swigCMemOwn = false;
				}
				this.swigCPtr = new HandleRef(null, IntPtr.Zero);
			}
			GC.SuppressFinalize(this);
			base.Dispose();
		}

		public new static OdDbSection cast(OdRxObject pObj)
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr p = TD_DbPINVOKE.OdDbSection_cast(OdRxObject.getCPtr(pObj));
			OdDbSection result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject((OdDbSection)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true));
				result = (OdDbSection)Teigha.Core.Helpers.odrxCreateObjectInternal(p, false);
			}
			else
			{
				result = (OdDbSection)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new static OdRxClass desc()
		{
			OdRxClass result = (OdRxClass)Teigha.Core.Helpers.odrxCreateObjectInternal(TD_DbPINVOKE.OdDbSection_desc(), false);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdRxClass isA()
		{
			OdRxClass result = (OdRxClass)Teigha.Core.Helpers.odrxCreateObjectInternal(TD_DbPINVOKE.OdDbSection_isA(this.swigCPtr), false);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdRxObject queryX(OdRxClass protocolClass)
		{
			OdRxObject result = Teigha.Core.Helpers.odrxCreateObjectInternal(TD_DbPINVOKE.OdDbSection_queryX(this.swigCPtr, OdRxClass.getCPtr(protocolClass)), false);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new static OdDbSection createObject()
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr p = TD_DbPINVOKE.OdDbSection_createObject__SWIG_0();
			OdDbSection result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject((OdDbSection)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true));
				result = (OdDbSection)Teigha.Core.Helpers.odrxCreateObjectInternal(p, false);
			}
			else
			{
				result = (OdDbSection)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public static OdDbSection createObject(OdGePoint3dArray pts, OdGeVector3d verticalDir)
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr p = TD_DbPINVOKE.OdDbSection_createObject__SWIG_1(OdGePoint3dArray.getCPtr(pts), OdGeVector3d.getCPtr(verticalDir));
			OdDbSection result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject((OdDbSection)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true));
				result = (OdDbSection)Teigha.Core.Helpers.odrxCreateObjectInternal(p, false);
			}
			else
			{
				result = (OdDbSection)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public static OdDbSection createObject(OdGePoint3dArray pts, OdGeVector3d verticalDir, OdGeVector3d vecViewingDir)
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr p = TD_DbPINVOKE.OdDbSection_createObject__SWIG_2(OdGePoint3dArray.getCPtr(pts), OdGeVector3d.getCPtr(verticalDir), OdGeVector3d.getCPtr(vecViewingDir));
			OdDbSection result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject((OdDbSection)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true));
				result = (OdDbSection)Teigha.Core.Helpers.odrxCreateObjectInternal(p, false);
			}
			else
			{
				result = (OdDbSection)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdDbSection.State state()
		{
			OdDbSection.State result = (OdDbSection.State)TD_DbPINVOKE.OdDbSection_state(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setState(OdDbSection.State nState)
		{
			TD_DbPINVOKE.OdDbSection_setState(this.swigCPtr, (int)nState);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public string getName()
		{
			string result = TD_DbPINVOKE.OdDbSection_getName__SWIG_0(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void getName(ref string sName)
		{
			IntPtr intPtr = Marshal.StringToCoTaskMemUni(sName);
			IntPtr value = intPtr;
			try
			{
				TD_DbPINVOKE.OdDbSection_getName__SWIG_1(this.swigCPtr, ref intPtr);
				if (TD_DbPINVOKE.SWIGPendingException.Pending)
				{
					throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
				}
			}
			finally
			{
				if (intPtr != value)
				{
					sName = Marshal.PtrToStringUni(intPtr);
				}
			}
		}

		public void setName(string pszName)
		{
			TD_DbPINVOKE.OdDbSection_setName(this.swigCPtr, pszName);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdGeVector3d viewingDirection()
		{
			OdGeVector3d result = new OdGeVector3d(TD_DbPINVOKE.OdDbSection_viewingDirection(this.swigCPtr), true);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult setViewingDirection(OdGeVector3d dir)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbSection_setViewingDirection(this.swigCPtr, OdGeVector3d.getCPtr(dir));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeVector3d verticalDirection()
		{
			OdGeVector3d result = new OdGeVector3d(TD_DbPINVOKE.OdDbSection_verticalDirection(this.swigCPtr), true);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult setVerticalDirection(OdGeVector3d dir)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbSection_setVerticalDirection(this.swigCPtr, OdGeVector3d.getCPtr(dir));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdGeVector3d normal()
		{
			OdGeVector3d result = new OdGeVector3d(TD_DbPINVOKE.OdDbSection_normal(this.swigCPtr), true);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult plane(OdGeVector3d uAxis, OdGeVector3d vAxis)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbSection_plane(this.swigCPtr, OdGeVector3d.getCPtr(uAxis), OdGeVector3d.getCPtr(vAxis));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public int indicatorTransparency()
		{
			int result = TD_DbPINVOKE.OdDbSection_indicatorTransparency(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setIndicatorTransparency(int nTransparency)
		{
			TD_DbPINVOKE.OdDbSection_setIndicatorTransparency(this.swigCPtr, nTransparency);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdCmColor indicatorFillColor()
		{
			OdCmColor result = new OdCmColor(TD_DbPINVOKE.OdDbSection_indicatorFillColor(this.swigCPtr), true);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void setIndicatorFillColor(OdCmColor color)
		{
			TD_DbPINVOKE.OdDbSection_setIndicatorFillColor(this.swigCPtr, OdCmColor.getCPtr(color));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public int numVertices()
		{
			int result = TD_DbPINVOKE.OdDbSection_numVertices(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult getVertex(int nIndex, OdGePoint3d pt)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbSection_getVertex(this.swigCPtr, nIndex, OdGePoint3d.getCPtr(pt));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult setVertex(int nIndex, OdGePoint3d pt)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbSection_setVertex(this.swigCPtr, nIndex, OdGePoint3d.getCPtr(pt));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult addVertex(int nInsertAt, OdGePoint3d pt)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbSection_addVertex(this.swigCPtr, nInsertAt, OdGePoint3d.getCPtr(pt));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult removeVertex(int nIndex)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbSection_removeVertex(this.swigCPtr, nIndex);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void getVertices(OdGePoint3dArray pts)
		{
			TD_DbPINVOKE.OdDbSection_getVertices(this.swigCPtr, OdGePoint3dArray.getCPtr(pts));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public OdResult setVertices(OdGePoint3dArray pts)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbSection_setVertices(this.swigCPtr, OdGePoint3dArray.getCPtr(pts));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public double height(OdDbSection.Height nHeightType)
		{
			double result = TD_DbPINVOKE.OdDbSection_height(this.swigCPtr, (int)nHeightType);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult setHeight(OdDbSection.Height nHeightType, double fHeight)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbSection_setHeight(this.swigCPtr, (int)nHeightType, fHeight);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult createJog(OdGePoint3d ptOnSection)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbSection_createJog(this.swigCPtr, OdGePoint3d.getCPtr(ptOnSection));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool hasJogs()
		{
			bool result = TD_DbPINVOKE.OdDbSection_hasJogs(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdDbObjectId getSettings()
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr cPtr = TD_DbPINVOKE.OdDbSection_getSettings__SWIG_0(this.swigCPtr);
			OdDbObjectId result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject(new OdDbObjectId(cPtr, true));
				result = new OdDbObjectId(cPtr, false);
			}
			else
			{
				result = new OdDbObjectId(cPtr, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdDbSectionSettings getSettings(OpenMode mode)
		{
			MemoryManager memoryManager = MemoryManager.GetMemoryManager();
			MemoryTransaction currentTransaction = memoryManager.GetCurrentTransaction();
			IntPtr p = TD_DbPINVOKE.OdDbSection_getSettings__SWIG_1(this.swigCPtr, (int)mode);
			OdDbSectionSettings result;
			if (currentTransaction != null)
			{
				currentTransaction.AddObject((OdDbSectionSettings)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true));
				result = (OdDbSectionSettings)Teigha.Core.Helpers.odrxCreateObjectInternal(p, false);
			}
			else
			{
				result = (OdDbSectionSettings)Teigha.Core.Helpers.odrxCreateObjectInternal(p, true);
			}
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public bool isLiveSectionEnabled()
		{
			bool result = TD_DbPINVOKE.OdDbSection_isLiveSectionEnabled(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public void enableLiveSection(bool bEnable)
		{
			TD_DbPINVOKE.OdDbSection_enableLiveSection(this.swigCPtr, bEnable);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public bool isInSlice()
		{
			bool result = TD_DbPINVOKE.OdDbSection_isInSlice(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult setInSlice(bool bInSlice)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbSection_setInSlice(this.swigCPtr, bInSlice);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public double thicknesDepth()
		{
			double result = TD_DbPINVOKE.OdDbSection_thicknesDepth(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult setThicknesDepth(double depth)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbSection_setThicknesDepth(this.swigCPtr, depth);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public double sectionPlaneOffset()
		{
			double result = TD_DbPINVOKE.OdDbSection_sectionPlaneOffset(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult setSectionPlaneOffset(double offset)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbSection_setSectionPlaneOffset(this.swigCPtr, offset);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdResult dwgInFields(OdDbDwgFiler pFiler)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbSection_dwgInFields(this.swigCPtr, OdDbDwgFiler.getCPtr(pFiler));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual void dwgOutFields(OdDbDwgFiler pFiler)
		{
			TD_DbPINVOKE.OdDbSection_dwgOutFields(this.swigCPtr, OdDbDwgFiler.getCPtr(pFiler));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual OdResult dxfInFields(OdDbDxfFiler pFiler)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbSection_dxfInFields(this.swigCPtr, OdDbDxfFiler.getCPtr(pFiler));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual void dxfOutFields(OdDbDxfFiler pFiler)
		{
			TD_DbPINVOKE.OdDbSection_dxfOutFields(this.swigCPtr, OdDbDxfFiler.getCPtr(pFiler));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual bool subWorldDraw(OdGiWorldDraw pWd)
		{
			bool result = TD_DbPINVOKE.OdDbSection_subWorldDraw(this.swigCPtr, OdGiWorldDraw.getCPtr(pWd));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual void subViewportDraw(OdGiViewportDraw pVd)
		{
			TD_DbPINVOKE.OdDbSection_subViewportDraw(this.swigCPtr, OdGiViewportDraw.getCPtr(pVd));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual OdResult subGetClassID(IntPtr pClsid)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbSection_subGetClassID(this.swigCPtr, pClsid);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual void subClose()
		{
			TD_DbPINVOKE.OdDbSection_subClose(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
		}

		public new virtual OdResult subTransformBy(OdGeMatrix3d xform)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbSection_subTransformBy(this.swigCPtr, OdGeMatrix3d.getCPtr(xform));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public new virtual OdResult subGetTransformedCopy(OdGeMatrix3d mat, out OdDbEntity pCopy)
		{
			IntPtr zero = IntPtr.Zero;
			OdResult result;
			try
			{
				OdResult odResult = (OdResult)TD_DbPINVOKE.OdDbSection_subGetTransformedCopy(this.swigCPtr, OdGeMatrix3d.getCPtr(mat), out zero);
				if (TD_DbPINVOKE.SWIGPendingException.Pending)
				{
					throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
				}
				result = odResult;
			}
			finally
			{
				pCopy = (OdDbEntity)Teigha.Core.Helpers.odrxCreateObjectInternal(zero, true);
			}
			return result;
		}

		public OdResult generateSectionGeometry(OdDbEntity pEnt, SWIGTYPE_p_OdArrayT_OdSmartPtrT_OdDbEntity_t_OdObjectsAllocatorT_OdSmartPtrT_OdDbEntity_t_t_t intBoundaryEnts, SWIGTYPE_p_OdArrayT_OdSmartPtrT_OdDbEntity_t_OdObjectsAllocatorT_OdSmartPtrT_OdDbEntity_t_t_t intFillEnts, SWIGTYPE_p_OdArrayT_OdSmartPtrT_OdDbEntity_t_OdObjectsAllocatorT_OdSmartPtrT_OdDbEntity_t_t_t backgroundEnts, SWIGTYPE_p_OdArrayT_OdSmartPtrT_OdDbEntity_t_OdObjectsAllocatorT_OdSmartPtrT_OdDbEntity_t_t_t foregroundEnts, SWIGTYPE_p_OdArrayT_OdSmartPtrT_OdDbEntity_t_OdObjectsAllocatorT_OdSmartPtrT_OdDbEntity_t_t_t curveTangencyEnts)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbSection_generateSectionGeometry__SWIG_0(this.swigCPtr, OdDbEntity.getCPtr(pEnt), SWIGTYPE_p_OdArrayT_OdSmartPtrT_OdDbEntity_t_OdObjectsAllocatorT_OdSmartPtrT_OdDbEntity_t_t_t.getCPtr(intBoundaryEnts), SWIGTYPE_p_OdArrayT_OdSmartPtrT_OdDbEntity_t_OdObjectsAllocatorT_OdSmartPtrT_OdDbEntity_t_t_t.getCPtr(intFillEnts), SWIGTYPE_p_OdArrayT_OdSmartPtrT_OdDbEntity_t_OdObjectsAllocatorT_OdSmartPtrT_OdDbEntity_t_t_t.getCPtr(backgroundEnts), SWIGTYPE_p_OdArrayT_OdSmartPtrT_OdDbEntity_t_OdObjectsAllocatorT_OdSmartPtrT_OdDbEntity_t_t_t.getCPtr(foregroundEnts), SWIGTYPE_p_OdArrayT_OdSmartPtrT_OdDbEntity_t_OdObjectsAllocatorT_OdSmartPtrT_OdDbEntity_t_t_t.getCPtr(curveTangencyEnts));
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult generateSectionGeometry(OdDbEntity pEnt, SWIGTYPE_p_OdArrayT_OdSmartPtrT_OdDbEntity_t_OdObjectsAllocatorT_OdSmartPtrT_OdDbEntity_t_t_t intBoundaryEnts, SWIGTYPE_p_OdArrayT_OdSmartPtrT_OdDbEntity_t_OdObjectsAllocatorT_OdSmartPtrT_OdDbEntity_t_t_t intFillEnts, SWIGTYPE_p_OdArrayT_OdSmartPtrT_OdDbEntity_t_OdObjectsAllocatorT_OdSmartPtrT_OdDbEntity_t_t_t backgroundEnts, SWIGTYPE_p_OdArrayT_OdSmartPtrT_OdDbEntity_t_OdObjectsAllocatorT_OdSmartPtrT_OdDbEntity_t_t_t foregroundEnts, SWIGTYPE_p_OdArrayT_OdSmartPtrT_OdDbEntity_t_OdObjectsAllocatorT_OdSmartPtrT_OdDbEntity_t_t_t curveTangencyEnts, bool bIsSetProperties)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbSection_generateSectionGeometry__SWIG_1(this.swigCPtr, OdDbEntity.getCPtr(pEnt), SWIGTYPE_p_OdArrayT_OdSmartPtrT_OdDbEntity_t_OdObjectsAllocatorT_OdSmartPtrT_OdDbEntity_t_t_t.getCPtr(intBoundaryEnts), SWIGTYPE_p_OdArrayT_OdSmartPtrT_OdDbEntity_t_OdObjectsAllocatorT_OdSmartPtrT_OdDbEntity_t_t_t.getCPtr(intFillEnts), SWIGTYPE_p_OdArrayT_OdSmartPtrT_OdDbEntity_t_OdObjectsAllocatorT_OdSmartPtrT_OdDbEntity_t_t_t.getCPtr(backgroundEnts), SWIGTYPE_p_OdArrayT_OdSmartPtrT_OdDbEntity_t_OdObjectsAllocatorT_OdSmartPtrT_OdDbEntity_t_t_t.getCPtr(foregroundEnts), SWIGTYPE_p_OdArrayT_OdSmartPtrT_OdDbEntity_t_OdObjectsAllocatorT_OdSmartPtrT_OdDbEntity_t_t_t.getCPtr(curveTangencyEnts), bIsSetProperties);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public double topPlane()
		{
			double result = TD_DbPINVOKE.OdDbSection_topPlane(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult setTopPlane(double arg0)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbSection_setTopPlane(this.swigCPtr, arg0);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public double bottomPlane()
		{
			double result = TD_DbPINVOKE.OdDbSection_bottomPlane(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult setBottomPlane(double arg0)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbSection_setBottomPlane(this.swigCPtr, arg0);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public double elevation()
		{
			double result = TD_DbPINVOKE.OdDbSection_elevation(this.swigCPtr);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		public OdResult setElevation(double arg0)
		{
			OdResult result = (OdResult)TD_DbPINVOKE.OdDbSection_setElevation(this.swigCPtr, arg0);
			if (TD_DbPINVOKE.SWIGPendingException.Pending)
			{
				throw TD_DbPINVOKE.SWIGPendingException.Retrieve();
			}
			return result;
		}

		private object locker = new object();

		private HandleRef swigCPtr;

		[Flags]
		public enum State
		{
			kPlane = 1,
			kBoundary = 2,
			kVolume = 4
		}

		[Flags]
		public enum SubItem
		{
			kNone = 0,
			kSectionLine = 1,
			kSectionLineTop = 2,
			kSectionLineBottom = 4,
			kBackLine = 8,
			kBackLineTop = 16,
			kBackLineBottom = 32,
			kVerticalLineTop = 64,
			kVerticalLineBottom = 128
		}

		[Flags]
		public enum Height
		{
			kHeightAboveSectionLine = 1,
			kHeightBelowSectionLine = 2
		}
	}
}
